package com.uxbee.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import com.uxbee.service.GertWebInfo;

public class InitService extends HttpServlet {

	/**
	 * Create date:2012-10-8 Describe :TODO
	 */
	private static final long serialVersionUID = 107544756838405016L;

	/**
	 * Constructor of the object.
	 */
	public InitService() {
		super();
	}

	/**
	 * Destruction of the servlet. <br>
	 */
	public void destroy() {
		super.destroy(); // Just puts "destroy" string in log
		// Put your code here
	}

	/**
	 * Initialization of the servlet. <br>
	 * 
	 * @throws ServletException
	 *             if an error occurs
	 */
	public void init() throws ServletException {
		super.init();
		// 启动爬虫
		for (int i = 0; i < 5; i++) {
			GertWebInfo gertWebInfo = new GertWebInfo();
			// 获取数据
			gertWebInfo.start();
		}
	}

}
